//Funciones que realizan la actividades del AJAX 
//Arguments: args[1]: pagina, div, metodo 

var CKEDITOR_BASEPATH = '/thechurch/ckeditor/';

function get()
{
	var args=get.arguments;
	
	
	if(args.length<1)
	{
			alert("Sin argumentos");
			exit (1);
	}

	$("#"+args[1]).load(args[0]);
}



function datepick()
{
	var args=datepick.arguments;
	
	
	if(args.length<1)
	{
			alert("Sin argumentos");
			exit (1);
	}

	$("#"+args[0]).datepicker();
}



function desaparece()
{
	var args=desaparece.arguments;
	
	
	if(args.length<1)
	{
			alert("Sin argumentos");
			exit (1);
	}

	$("#"+args[0]).fadeOut(1600);
}
 
//JavaScript Document

function showError(e){

  alert(e);

}



function post(url, consumer, form){
	  var message = Clean.createSimpleMessage(url, consumer, showError);	
	  Clean.postFormByName(message, form, false);
	} 

function postfile(url, consumer, form, enctype){
	  var message = Clean.createSimpleMessage(url, consumer, showError);	
	  Clean.postFormByName(message, form, enctype);
	}




function setContentValue()
{
	var c=document.getElementById("contents");
	c.value=CKEDITOR.instances.contents.getData();
}


function LoadStyle()
{
	 $('head').append('<link rel="stylesheet" href="css/lightbox.css" type="text/css" />');
}



